$(function () {
    var dom = document.getElementById("main");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    option = {
        title: {
            text: '一季度统计表'
        },
        legend: {},
        tooltip: {},
        dataset: {
            source: [
                ['product','迟到', '请假','旷工','单位（人）'],
                ['一月', 43.3, 85.8, 93.7,56],
                ['二月', 83.1, 73.4, 55.1,4],
                ['三月', 86.4, 65.2, 82.5,44],
            ]
        },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}

        ]
    };

    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }

    $("td,th").addClass("text-center");
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#test1',
            format:'yyyy年M月',
            type: 'month',
            value: new Date()
        });
    });

    $('#myTabs a').click(function (e) {
        e.preventDefault();
        $(this).tab('show');
    });

    $('.btn-default').click(function () {

    });
});